//
//  RBLuckyDrawPopVC.m
//  zhongzhenglu
//
//  Created by XL on 2022/8/29.
//

#import "RBLuckyDrawPopVC.h"
#import "RBDefine.h"
#import "UIView+RBAdd.h"
#import "UIScrollView+RBAdd.h"
#import "RBSearchTagView.h"
#import "RBThemeConfig.h"
#import <Masonry.h>
#import "RBNavigationBar.h"
#import "RBTextField.h"
#import "UIButton+RBAdd.h"
#import <UIColor+YYAdd.h>

@interface RBLuckyDrawPopVC ()

@property(nonatomic, strong)IBOutlet UIImageView *bgImgView;
@property(nonatomic, strong)IBOutlet UILabel *titleL;
@property(nonatomic, strong)IBOutlet UILabel *desL;
@property(nonatomic, strong)IBOutlet UIImageView *motionImgView;
@property(nonatomic, strong)IBOutlet UIButton *oneMoreBtn;

@end

@implementation RBLuckyDrawPopVC

#pragma mark - Lifecycle

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self setup];
}

#pragma mark - Private

- (void)setup
{
    self.dismissOnTapBlank = NO;
    [self.contentView zoomSubViewsWithSelf];
    if (self.success)
    {
        self.bgImgView.image = [UIImage imageNamed:@"luckDrawSmileBg"];
        self.titleL.text = @"恭喜中奖";
        self.titleL.textColor = [UIColor colorWithHexString:@"#E93244"];
        self.desL.text = self.name;
        self.motionImgView.image = [UIImage imageNamed:@"luckDrawSmile"];
        self.oneMoreBtn.backgroundColor = [UIColor colorWithHexString:@"#EA364D"];
    }
    else
    {
        self.bgImgView.image = [UIImage imageNamed:@"luckDrawSadBg"];
        self.titleL.text = @"很遗憾 未中奖";
        self.titleL.textColor = [RBThemeConfig textBlackColor];
        self.desL.text = @"不要灰心,么么哒";
        self.motionImgView.image = [UIImage imageNamed:@"luckDrawSad"];
        self.oneMoreBtn.backgroundColor = [RBThemeConfig buttonBlueColor];
    }
}

- (void)show
{
    [self.contentView addLittleZoomAnimation];
}

- (IBAction)dismiss
{
    [self dismissViewControllerAnimated:NO completion:nil];
}

#pragma mark - Network

#pragma mark - Event

- (IBAction)oneMoreBtnTapped:(id)sender
{
    if (self.oneMoreBlock)
    {
        self.oneMoreBlock();
    }
    [self dismiss];
}

#pragma mark - Setter

#pragma mark - Getter



@end
